package com.qd.system.model;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 发送日志
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_send_log")
public class SendLog extends Model<SendLog> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 业务ID:方便查询
     */
    @TableField("bid")
    private String bid;
    /**
     * 子业务ID
     */
    @TableField("child_bid")
    private String childBid;
    /**
     * 发送地址
     */
    @TableField("url")
    private String url;
    /**
     * 请求参数
     */
    @TableField("req_param")
    private String reqParam;
    /**
     * 请求方式
     */
    @TableField("req_method")
    private String reqMethod;
    /**
     * 返回结果
     */
    @TableField("response_msg")
    private String responseMsg;
    /**
     * 写入时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 异常信息:状态为1时有值
     */
    @TableField("err_msg")
    private String errMsg;
    /**
     * 耗时
     */
    @TableField("time_consumer")
    private Long timeConsumer;
    /**
     * 日志类型
     */
    @TableField("log_type")
    private String logType;
    /**
     * 发送状态
     */
    @TableField("send_state")
    private String sendState;
    /**
     * 应用ID
     */
    @TableField("app_id")
    private String appId;
    /**
     * 公司ID
     */
    @TableField("e_id")
    private String eId;

    public void freeData() {
        this.id = null;
        this.bid = null;
        this.childBid = null;
        this.url = null;
        this.reqParam = null;
        this.reqMethod = null;
        this.responseMsg = null;
        this.addTime = null;
        this.errMsg = null;
        this.timeConsumer = null;
        this.logType = null;
        this.sendState = null;
        this.appId = null;
        this.eId = null;
    }

}
